<?php
// +----------------------------------------------------------------------
// | LIKE [ JUST DO IT ]
// +----------------------------------------------------------------------
// | Author: Mr.hu <huhaiyang7788@163.com>
// +----------------------------------------------------------------------
// | DESC: 
// +----------------------------------------------------------------------


namespace common\controllers;


class Functions
{
    /**
     * 日期格式化
     * @param $format
     * return bool|string
     * @ Mr.hu.
     */
    public static function dateTime($format)
    {
        if($format){
            return date($format);
        }else{
            return date('Y-m-d H:i:s');
        }
    }


    /**
     * 添加数据到mongo中
     * @param $data
     * return void
     * @ Mr.hu.
     */
    public static function addMongoData($data)
    {
        return true;
    }


    /**
     * 对明文密码进行加密
     * @param $pass
     * return void
     * @ Mr.hu
     */
    public static function decodePass($pass)
    {
        return $pass;
    }

}